#ifndef _TRILINEAR_KERNEL
#define _TRILINEAR_KERNEL

#include <cuda_runtime_api.h>

#ifndef MAX_LEVEL
#define MAX_LEVEL (33)
#endif

#ifndef MAX_SHIFT_NUM
#define MAX_SHIFT_NUM (12)
#endif

__global__ void TriLinearForward(const int nthreads, const float* lut, const float* image, \
                                float* output, const int dim, const int shift, const float binsize, \
                                const int width, const int height, const int batch);

int TriLinearForwardGpu(const float* lut, const float* image, float* output, const int lut_dim, \
                        const int shift, const float binsize, const int width, const int height, \
                        const int batch, const int bit_num, cudaStream_t stream);

int TriLinearForwardCpu(const float* lut, const float* image, float* output, const int dim, \
                        const int shift, const float binsize, const int width, const int height, \
                        const int channels, const int bit_num);
#endif

